import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { TodoService } from '../../../services/todo.service'

@Component({
  selector: 'app-todo-list',
  templateUrl: './todo-list.component.html',
  styleUrls: ['./todo-list.component.less']
})

export class TodoListComponent implements OnInit {
  @Input() todoLists: any[];

  @Output() del = new EventEmitter<any>();
  constructor(public ts: TodoService) { }

  ngOnInit() {
  }

  onDdelTodo(id: number) {
    console.log('id', id)
    // this.ts.delTodo(id)
    this.del.emit(id)
  }

}
